package org.example.ftp.controller;

import org.example.ftp.entity.TestEnum;
import org.example.ftp.mapper.TestEnumMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/plugin")
public class MybatisPluginController {
    @Autowired
    private TestEnumMapper testEnumMapper;
    @GetMapping("/findByPage/{pageNum}/{pageSize}")
    public void findByPage(@PathVariable("pageNum") int pageNum,
                           @PathVariable("pageSize") int pageSize) {
        List<TestEnum> testEnums = testEnumMapper.page(pageNum,pageSize);
        System.out.println(testEnums);
    }
}
